package thesis.database;

import java.util.Date;
import java.util.List;

import javax.sql.DataSource;

public interface RouteDAO {
	/**
	 * This is the method to be used to initialize database resources ie.
	 * connection.
	 */
	public void setDataSource(DataSource ds);

	/**
	 * This is the method to be used to create a record in the Route table.
	 */
	public void create(Route route);

	/**
	 * This is the method to be used to list down a record from the Route table
	 * corresponding to a passed Route id.
	 */
	public Route getRoute(Integer id);
	
	public List<Route> getRoutesIn10Days(Integer id);

	/**
	 * This is the method to be used to list down all the records from the Route
	 * table.
	 */
	public List<Route> listRoutes();

	/**
	 * This is the method to be used to delete a record from the Route table
	 * corresponding to a passed Route id.
	 */
	public void delete(Integer id);

	/**
	 * This is the method to be used to update a record into the Route table.
	 */
	public void update(Route route);

	public List<Route> getRouteById(int id, String start, String end);
}
